﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using MpSoft.Basic.Configuration;


namespace MpSoft.Web
{
    public class Global : System.Web.HttpApplication
    { 

        protected void Application_Start(object sender, EventArgs e)
        {
            Application["FCKeditor:UserFilesPath"] = "../../../../../uploads/";
            try
            {
                MpConfig.Init();
            }
            catch (Exception)
            {
            }
          
        }

        protected void Session_Start(object sender, EventArgs e)
        {
           
        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {
            MpConfig.Init();
        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {
            //Exception ex = Server.GetLastError();
            //if (ex != null)
            //    MpSoft.Library.BUSS.Settings.SettingBUSS.Setting_Add("ERROR", ex.Message + "," + ex.ToString());
        }

        protected void Session_End(object sender, EventArgs e)
        {
            //Application.Lock();
            //Application["visitors_online"] = Convert.ToUInt32(Application["visitors_online"]) - 1;
            //Application.UnLock();
        }

        protected void Application_End(object sender, EventArgs e)
        {

        }

        
    }
}